package de.gameduell.framework.game.matching {
	import de.gameduell.framework.game.matching.TokenEvent;
	
	import flash.events.EventDispatcher;	

	/**
	 * @author cbra
	 */
	public class GenToken extends EventDispatcher implements IToken{
		
		protected var _color:String;			
		
		public function GenToken() {
			
		}
		
		public function equals(aToken:IToken):Boolean{
			if(aToken != null){
				return aToken.color == color;
			}else{
				return false;
			}
		}
		
		public function remove():void{
			dispatchEvent(new TokenEvent(TokenEvent.REMOVED,this));
		}
		
		public function set color(aColor:String):void{
			 _color = aColor;
		}
		
		public function get color():String{
			return _color;
		}
	}
}
